home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / c / indents.zip / readme < prev    next >
Text File  |  1993-05-30  |  11KB  |  241 lines

  1. This version of indent should clean compile under BSD UNIX cc or any ANSI C
  2. compiler, under any operating system (BSD UNIX, DOS and OS2 definatly).
  3.  
  4. It is backward compatible with all previous versions except that:
  5.  
  6. Profile files are no longer hidden files under UNIX,
  7.  
  8. Arguments must now be separated from options with a ':' e.g. -c:33
  9.  
  10. Option names can't start with an 'n'
  11.  
  12. Option -bl is now called -nbr.
  13.  
  14. Options -cci:n and -cli:n now take a number of spaces as an argument, rather
  15. than a fractional tab stop.
  16.  
  17. These changes were made to simplify the argument parsing and improve
  18. portability. (See Vanilla C port, below).
  19.  
  20. Peter Hadfield (hadfield@uk.ac.bangor.sees) 24-05-93
  21.  
  22.  
  23.  
  24. This is the ReadMe file that came with the first version of indent that I
  25. managed to recompile. Sorry, can't remember where it came from. PH.
  26.  
  27. This is the C indenter, it originally came from the University of Illinois via
  28. some distribution tape for PDP-11 UNIX.  It has subsequently been hacked upon
  29. by James Gosling @ CMU.  It isn't very pretty, and really needs to be
  30. completely redone, but it is probably the nicest C pretty printer around.
  31.  
  32. Further additions to provide "Kernel Normal Form" were contributed by the
  33. folks at Sun Microsystems.
  34.  
  35. > From mnetor!yunexus!oz@uunet.UU.NET Wed Mar  9 15:30:55 1988
  36. > Date: Tue, 8 Mar 88 18:36:25 EST
  37. > From: yunexus!oz@uunet.UU.NET (Ozan Yigit)
  38. > To: bostic@okeeffe.berkeley.edu
  39. > Cc: ccvaxa!willcox@uunet.UU.NET, jag@sun.com, rsalz@uunet.UU.NET
  40. > In-Reply-To: Keith Bostic's message of Tue, 16 Feb 88 16:09:06 PST 
  41. > Subject: Re: Indent...
  42.  
  43. Thank you for your response about indent. I was wrong in my original
  44. observation (or mis-observation :-). UCB did keep the Illinois copyright
  45. intact.
  46.  
  47. The issue still is whether we can distribute indent, and if we can, which
  48. version. David Willcox (the author) states that:
  49.  
  50.   Several people have asked me on what basis I claim that indent is in the
  51.   public domain.  I knew I would be sorry I made that posting.
  52.  
  53.   Some history.  Way back in 1976, the project I worked on at the University
  54.   of Illinois Centre for Advanced Computation had a huge battle about how to
  55.   format C code.  After about a week of fighting, I got disgusted and wrote a
  56.   program, which I called indent, to reformat C code.  It had a bunch of
  57.   different options that would let you format the output the way you liked. In
  58.   particular, all of the different formats being championed were supported.
  59.  
  60.   It was my first big C program.  It was ugly.  It wasn't designed, it just
  61.   sort of grew.  But it pretty much worked, and it stopped most of the
  62.   fighting.
  63.  
  64.   As a matter of form, I included a University of Illinois Copyright notice.
  65.   However, my understanding was that, since the work was done on an ARPA
  66.   contract, it was in the public domain.
  67.  
  68.   Time passed.  Some years later, indent showed up on one of the early emacs
  69.   distributions.
  70.  
  71.   Later still, someone from UC Berkeley called the UofI and asked if indent
  72.   was in the public domain.  They wanted to include it in their UNIX
  73.   distributions, along with the emacs stuff.  I was no longer at the UofI, but
  74.   Rob Kolstad, who was, asked me about it.  I told him I didn't care if they
  75.   used it, and since then it has been on the BSD distributions.
  76.  
  77.   Somewhere along the way, several other unnamed people have had their hands
  78.   in it.  It was converted to understand version 7 C.  (The original was
  79.   version 6.)  It was converted from its original filter interface to its
  80.   current "blow away the user's file" interface. The $HOME/.indent.pro file
  81.   parsing was added. Some more formatting options were added.
  82.  
  83. The source I have right now has two copyright notices.  One is the original
  84. from the UofI.  One is from Berkeley.
  85.  
  86. I am not a lawyer, and I certainly do not understand copyright law.  As far as
  87. I am concerned, the bulk of this program, everything covered by the UofI
  88. copyright, is in the public domain, and worth every penny. Berkeley's
  89. copyright probably should only cover their changes, and I don't know their
  90. feelings about sending it out.
  91.  
  92. In any case, there appears to be noone at UofI to clarify/and change that
  93. copyright, but I am confident (based on the statements of its author) that the
  94. code, as it stands with its copyright, is distributable, and will not cause
  95. any legal problems.
  96.  
  97. Hence, the issue reduces to *which* one to distribute through
  98. comp.sources.unix. I would suggest that with the permission of you folks
  99. (given that you have parts copyrighted), we distribute the 4.3 version of
  100. indent, which appears to be the most up-to-date version. I happen to have just
  101. about every known version of indent, including the very original submission
  102. from the author to a UNIX tape, later the G-Emacs version, any 4.n version,
  103. sun version and the Unipress version.  I still think we should not have to
  104. "go-back-in-time" and re-do all the work you people have done.
  105.  
  106. I hope to hear from you as to what you think about this. You may of course
  107. send 4.3 version to the moderator directly, or you can let me know of your
  108. permission, and I will send the sources, or you can let me know that 4.3
  109. version is off-limits, in which case we would probably have to revert to an
  110. older version. One way or another, I hope to get a version of indent to
  111. comp.sources.unix.
  112.  
  113. regards..    oz
  114.  
  115. cc: ccvaxa!willcox
  116.     sun.com!jar
  117.     uunet!rsalz
  118.  
  119.  
  120.                           VANILLA C (AND DOS) PORT
  121.                           ------------------------
  122.  
  123. Peter Hadfield, 4-04-93.
  124.  
  125. Ported to Vanilla C, now clean compiles with all the warnings turned on (SUN
  126. BSD UNIX cc & gcc & DOS Borland C++ (set to strict ANSI C)). Source code
  127. cleaned up and encapsulation improved.
  128.  
  129. Command line option scanning rewritten. Option names cannot now start with a
  130. 'n', options and their arguments must be separated by a ':'. This greatly
  131. simplified the argument parsing routine.
  132.  
  133. Several files can be specified on the command line or a list of files can be
  134. specified. The infile, outfile operation was not very useful and it was too
  135. easy to shoot yourself in the foot.
  136.  
  137. Options -tabu and -tabu added. Option -bl is now -nbr for consistency. Options
  138. -cli:n now takes an integer number of spaces, rather than a float (this
  139. simplifies command line processing).
  140.  
  141. indent.pro is no longer a UNIX hidden file for DOS compatibility.
  142.  
  143. Usage and current option display added.
  144.  
  145. Added option -cp and support for spaces between '#' and if, else and endif.
  146.  
  147. 1-05-93.
  148.  
  149. Added C++ support by merging the C++ compatible code found in
  150. comp.sources.misc.
  151.  
  152. Options -cci:n now take a number of spaces as an argument, rather than
  153. a fractional tab stop.
  154.  
  155. indent.doc generated from indent.1 with: nroff -man indent.1
  156.  
  157. Added (most of) the improvements made by Jon Saxton who ported indent to OS2.
  158. Part of his readme file follows:
  159.  
  160. >                         OS/2 implementor's note
  161. >                         -----------------------
  162.  
  163. >   There seems to have been three streams of development for this program.
  164.  
  165. >   The original indent came from the University of Illinois where it was
  166. >   apparently written in 1976.  Some work was done by James Gosling and the
  167. >   people at Sun Microsystems.  The program became part of the BSD UNIX
  168. >   distribution at some time not later than 1985.  At around that time it was
  169. >   ported to DOS by Bruce Mallett and various fixes were done by Bruce
  170. >   Mallett and James Thompson.  James Thompson also implemented the handling
  171. >   of tabs at spacings other than 8 (surely a most worthwhile enhancement;
  172. >   who programs in C with tabs set at 8 anyway?)
  173.  
  174. >   While all this good stuff was going on, other (unnamed) people upgraded
  175. >   the original program to handle C++ syntax as well as ordinary C and
  176. >   apparently fixed a few minor annoyances which were extant in the version
  177. >   from which the DOS implementation was derived.
  178.  
  179. >   Then of course, the GNU project people of the Free Software Foundation
  180. >   have been doing things with sources apparently derived from the BSD
  181. >   version.
  182.  
  183. >   I have not looked at t